import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int count = 3;
        while (count != 0){
            System.out.println("请输入密码： 你还有" + count +"次机会");
            String pass = in.nextLine();
            if(pass.equals("123456")) {
                System.out.println("登录成功");
                break;
            }else{
                count --;
                System.out.println("登录失败");
            }
        }

    }
}